package com.igs.muziapp;

import com.igs.muziapp.view.Playdata_row0;
import com.igs.muziapp.view.Playdata_table;

import android.content.Context;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TableLayout;
import android.widget.TableRow;

public class Playdata {
	private View view;
	private RelativeLayout Coininfo_Box = null;

	private coininfobar viewCoininfobar = null;

	private Playdata_table Basic_table;
	private Playdata_table ARate_table;
	private Playdata_table FullCombo_table;

	private LinearLayout scrollview_data = null;

	private Context context;

	public Playdata(Context context) {
		this.context = context;

		LayoutInflater mLi = LayoutInflater.from(context);
		view = mLi.inflate(R.layout.muzi_playerdata, null);
		viewCoininfobar = new coininfobar(context);

		Coininfo_Box = (RelativeLayout) view.findViewById(R.id.coininfobar_box);
		scrollview_data = (LinearLayout) view.findViewById(R.id.scrollview_data);

		Coininfo_Box.addView(viewCoininfobar.getView());

		String DataBasic[][] = { { "強度數值", "341" }, { "最大連段", "1389" }, { "目前連段", "1308" }, { "登入次數", "112" } };
		String DataARate[][] = { { "Lv.1", "1.54" }, { "Lv.2", "1.5" }, { "Lv.3", "42.51" }, { "Lv4", "8.87" } };
		String DataFullCombo[][] = { { "Lv.1", "0.85" }, { "Lv.2", "0.85" }, { "Lv.3", "6.78" }, { "Lv.4", "0" } };

		Basic_table = new Playdata_table(context, "基本數值", DataBasic);
		scrollview_data.addView(Basic_table.getView());
		ARate_table = new Playdata_table(context, "A Rate%數", DataARate);
		scrollview_data.addView(ARate_table.getView());
		FullCombo_table = new Playdata_table(context, "FULL COMBO%數", DataFullCombo);
		scrollview_data.addView(FullCombo_table.getView());

	}

	public View getView() {
		return view;
	}

}
